<% cache ["project_favicon_v5", project.id, project.domains.first&.domain_name], expires_in: 7.days do %>
  <% if project.domains.any? %>
    <% favicon_service = FaviconService.new(project.domains.first.domain_name) %>
    <% if favicon_service.exists?(provider: :duckduckgo) %>
      <% favicon_url = favicon_service.fetch_url %>
      <img src="<%= favicon_url %>" alt="favicon" class="w-5 h-5" onerror="this.style.display='none'; this.nextElementSibling.style.display='inline-block';">
      <iconify-icon icon="lucide:globe" class="w-5 h-5" style="display:none;"></iconify-icon>
    <% else %>
      <iconify-icon icon="lucide:globe" class="w-5 h-5"></iconify-icon>
    <% end %>
  <% else %>
    <iconify-icon icon="lucide:globe" class="w-5 h-5"></iconify-icon>
  <% end %>
<% end %>